package com.cmnit.analysis.service

import com.cmnit.analysis.dao.GbVerticalSectionDicDao
import com.cmnit.analysis.util.ConfigurationManager
import org.apache.log4j.Logger

class GbVerticalSectionDicService {
  private val logger: Logger = Logger.getLogger(this.getClass)
  private val dao = new GbVerticalSectionDicDao

  def service(): Unit = {
    // 删除需要插入的账期数据
    dao.delete(ConfigurationManager.getProperty("GbVerticalSectionDic.TableName"))

    // 写入数据
    dao.write(ConfigurationManager.getProperty("GbVerticalSectionDic.TableName"), dao.GbVerticalSectionDicData())

    // 查看写入结果
    dao.read(ConfigurationManager.getProperty("GbVerticalSectionDic.TableName"))
  }
}